package com.lxw.study.behavioral.visitor;

public class FileSystemStructure {
    private Element[] elements;

    public FileSystemStructure(Element... elements) {
        this.elements = elements;
    }

    // 对象结构接受访问者访问
    public void accept(Visitor visitor) {
        for (Element element : elements) {
            element.accept(visitor);
        }
    }

}
